/**
 * author:Administrator
 * date:2016/4/12
 * desc:总zol下载图片
 */
'use strict';

var MyCrawler = require('./Crawler.js');

class CrawlerImg extends MyCrawler {
  constructor(opt) {
    super(opt);
  }
}

var imgCrawler = new CrawlerImg({
  debug: 1,
  url: 'http://desk.zol.com.cn/bizhi/6361_78284_2.html',
  maxThread: 9,
  label: {a: 'href', img: 'src'},
  saveFile: ['jpg'],
  depth: 9,
  maxSize: 1024 * 1000,
  minSize: 1024 * 100,  // min 300k
  include: [
    /\.html/,
    /\.jpg/,
  ],
  exclude: [
    /^javascript/i,
    /^\/user/i,
    /^#/,
    /^\/oauth_api/,
    /^\/comment/,
    /^\/rising/,
    /\.7z/,
    /\.xml/,
    /\.exe/,
    /\.apk/,
    /\.ipa/,
    /\.rpm/,
    /\.tgz/,
    /\.rar/,
    /\.zip/,
    /\.php/,
    /http:\/\/qr\./,   // http://qr.
  ]
});

imgCrawler.start();